package com.miukoo.aikao.ucenter.services;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.miukoo.aikao.core.dtos.PageReqDto;
import com.miukoo.aikao.core.dtos.PageResDto;
import com.miukoo.aikao.ucenter.dto.WrongQuestionDto;
import com.miukoo.aikao.ucenter.pojos.WrongQuestion;

import java.util.List;

/**
　* 用户错题集
　* @Author miukoo<miukoo@126.com>
　* @Date 2020/11/19 20:14
　* @Version 1.0
  */
public interface WrongQuestionService extends IService<WrongQuestion> {

    /**
    * 分页查询数据
    * @param reqDto
    * @return
    */
    PageResDto<List<WrongQuestion>> listByUserId(PageReqDto<WrongQuestionDto> reqDto,Long userId);

    /**
     * 加入错题
     * @param quId
     * @param examId
     */
    void addWrongQuestion(Long examId, Long quId, Long userId);

    /**
     * 查找第一个错题
     * @param quId
     * @param examId
     * @return
     */
    Long findNext(Long examId, Long quId, Long userId);

}
